package com.aimuceliang.aimuceliang.api;

import com.aimuceliang.aimuceliang.bean.HttpResult;

import java.util.Map;

import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by ziabo on 2017/7/27.
 * Retrofit的接口类
 */

public interface ApiInterface {

    /**
     * 登录接口
     */
    @FormUrlEncoded
    @POST("LoginAPIServlet")
    Observable<HttpResult> login(@FieldMap() Map<String, Object> map);

    /**
     * 注册接口
     */
    @FormUrlEncoded
    @POST("RegistAPIServlet")
    Observable<HttpResult> register(@FieldMap() Map<String, Object> map);

    /**
     * 修改密码
     */
    @FormUrlEncoded
    @POST("RestpwdAPIServlet")
    Observable<HttpResult> modify_pwd(@FieldMap() Map<String, Object> map);

    /**
     * 字典
     */
    @FormUrlEncoded
    @POST("DictAPIServlet")
    Observable<HttpResult> getDict(@FieldMap() Map<String, Object> map);
}
